package part6blockingque;

import java.util.concurrent.ArrayBlockingQueue;

/*
 * 测试ArrayBlockingQueue边界异常
 * */
public class ArrayBlockingQueueTest01 {

    public static void main(String[] args) {
        ArrayBlockingQueue blockingQueue = new ArrayBlockingQueue<>(3);

        System.out.println(blockingQueue.add("a"));
        System.out.println(blockingQueue.add("b"));
        System.out.println(blockingQueue.add("c"));
        System.out.println(blockingQueue.add("d"));
        // 报异常：java.lang.IllegalStateException: Queue full
    }

}
